package org.management.system.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.management.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;

/**
 * 功能描述
 * 用户模块
 * @author jiangyan
 * @date 2019/03/14
 * @description
 * @project management
 */
@Data
@ApiModel(value="用户")
@EqualsAndHashCode(callSuper = true)
@Table(name = "sys_user")
public class UserEntity extends BaseEntity {
    /**
     * 昵称
     */
    @Column(name = "NICK_NAME")
    @NotEmpty(message = "昵称不能为空")
    @ApiModelProperty(value = "昵称",name = "nickName", required = true)
    private String nickName;

    /**
     * 登录名称
     */
    @Column(name = "LOGIN_NAME")
    @NotEmpty(message = "登录名称不能为空")
    @ApiModelProperty(value = "登录名称",name = "loginName", required = true)
    private String loginName;

    /**
     * 用户密码
     */
    @Column(name = "PASSWORD")
    @NotEmpty(message = "用户密码不能为空")
    @ApiModelProperty(value = "用户密码",name = "password", required = true)
    private String password;

    /**
     * 登录状态 1启用 0 禁用
     */
    @Column(name = "IS_OPEN")
    @ApiModelProperty(value = "登录状态 1启用 0 禁用",name = "isOpen")
    private Boolean isOpen;

    /**
     * 最后修改地址ip
     */
    @Column(name = "LAST_UPDATE_IP")
    @ApiModelProperty(value = "最后修改地址ip",name = "lastUpdateIp")
    private String lastUpdateIp;

    @Column(name = "PHONE")
    @ApiModelProperty(value = "PHONE",name = "phone")
    private String phone;

    /**
     * 电子邮件
     */
    @Column(name = "EMAIL")
    @ApiModelProperty(value = "电子邮件",name = "email")
    private String email;

    @Column(name = "PICTURE")
    @ApiModelProperty(value = "PICTURE",name = "picture")
    private String picture;
}